package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.entity.User;
import com.example.demo.feign.UserFeignClient;
@RestController //@Controller+@ResponseBody
public class MovieController {
	@Autowired
	private UserFeignClient feignClient;
	
	
	@GetMapping("/movie/{id}") //@RequestMapping(method={GET})
	public User getMovieUser(@PathVariable("id") Long id) {
		return feignClient.getUserById(id);
	}
	
}
